Skip to main content

All Questions

Tagged with
1vote
0answers
66views

Best practice: slightly different logic on multi mapping endpoint

Suppose I've got a spring controller as follows: ⋮ @RestController public class MyController { ⋮ @PostMapping(value = { "publicAPI/addItem", "internalAPI/addItem" }) ...
zZz's user avatar
  • 11
-3votes
1answer
112views

How to format request and response

I am new to backend REST API development. I am creating the CRUD APIs for books using spring boot. I have a model class lets say 'user'. It will have many fields, like id, name, email, status, ...
Nitish's user avatar
2votes
3answers
917views

How can I avoid duplicate annotations when validating both Entity and DTOs?

I am using the Spring Boot framework to create a RESTFUL API and I need a way to avoid the duplication of validation rules when using multiple DTOs as request/response objects for my endpoints. Using ...
Marco Pierre White's user avatar
-1votes
2answers
128views

Best practices for API design for an E-Commerce System

I have a few basic questions on how to implement an API for a basic e-commerce system. The relevant entities are Customer, Puffle, and Review. Each Puffle can have zero or more Reviews. Each Review is ...
Richard Robinson's user avatar
0votes
1answer
126views

Am I understanding OAuth2 correctly and is what I am trying to achieve possible?

I am creating a web application which has three distinct components as far as I understand. A Nuxt frontend, and Spring Boot backend and Google OAuth2 for authentication using OpenID Connect. Nuxt can ...
DGrinbergs's user avatar
0votes
4answers
2kviews

Frontend/backend SPA communication: how to handle a list of string options

I have single page application with an Angular frontend and a Spring REST-backend. What is the proper way to handle a list of string-based options in the fronted the enduser can select from, which ...
yorika90's user avatar
0votes
0answers
273views

Using JWT token to create spring session

I have a web application like this: An angular frontend for client and a spring MVC backend for admin panel. A angular web application requests a JWT token from tomcat/spring MVC. The angular ...
desertSniper87's user avatar
0votes
0answers
75views

How can I design a secure content verification web application?

In my country, there is a high number of fraudulent doctor's sick letter as they are manually written on paper. I'm designing a web application to combat this issue and have the whole process ...
Siya Stoan Sosibo's user avatar
2votes
1answer
163views

Handling OAuth 2.0 access token

I am creating a rest template to consume REST API secured by OAuth 2.0. The provider has implemented an expiry for the access token for 5 mins. So Using the rest template, I will be calling the ...
Brooklynn99's user avatar
4votes
1answer
806views

Is this a good design for wrapping asynchronous API calls into a RESTful interface?

I'm working with an API that has many asynchronous calls and handlers. I'd like to extend these with a RESTful interface and endpoints in spring. I'm imagining the usual Controller and Service layers, ...
user26270's user avatar
-1votes
1answer
177views

What is the best practice to insert two similar records in sql server db table which will be sent to two different destinations?

I am working on parsing a file and inserting records into SQL Server DB.The database table structure will be something like this: A Users table which contains (id, name, address, destinationName,...
Brooklynn99's user avatar
-1votes
1answer
1kviews

Pattern for for REST API who's response depends on behavior of requests to other services

Some one help me with my design paralysis! Assume a microservice (probably going to be implemented in Spring Boot) that has implemented an run of the mill REST API, and after receiving an initial ...
Englishbob's user avatar
1vote
0answers
2kviews

dealing with too many DTO / Java

We are building an pseudo-rest API (because no body cares/funds for a full blown rest API for internal use - which is OK). So we have elements of Rest API (links for resources, API naming conventions ...
Dexters's user avatar
1vote
0answers
834views

How to make rest api end points in swagger UI pre authenticated in Spring BOOT [closed]

I have written a spring boot rest API application with OAuth.I have integrated swagger UI for API documentation. I want the API endpoints on swagger UI to be accessible without an access token. This ...
Curious's user avatar
2votes
2answers
2kviews

Returning JPA Entities in Rest Api's?

Recently Ive seen so many devs working with the stack Spring/JPA and returning all these JPA entities on their rest controllers. In my opinion it's a BAD PRACTICE for several reason such: ...
carlos.hager's user avatar

153050per page
close